<?php


namespace app\api\controller;


use think\Exception;
use think\facade\Cache;

class Logout extends Auth
{

    public function index()
    {
        try {
            Cache::store('redis')->delete('token_' . $this->AccessToken);
        } catch (Exception $e) {
            throw  new Exception('退出失败');
        }

        return show(1, '退出成功');
    }
}